<?php
/**
 * Bootstrap
 *
 * @category Application
 * @package  Bootstrap
 * 
 * @version $Id: Bootstrap.php 87 2010-08-29 10:15:50Z vadim.leontiev $
 */

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{

    /**
     * Initialize the autoloader
     *
     * @return Zend_Application_Module_Autoloader
     */
    protected function _initAutoload()
    {
        $this->bootstrap('frontController');
        $this->_front = $this->getResource('frontController');
        $autoLoader = Zend_Loader_Autoloader::getInstance();

        return $autoLoader;
    }

    /**
     * Initialize the controllers
     *
     * @return void
     */
    protected function _initControllers()
    {
        foreach($this->_front->getControllerDirectory() as $module=>$path) {
            $loader = new Zend_Application_Module_Autoloader(array(
                'basePath'  => substr($path, 0, -12),
                'namespace' => ucfirst($module)
            ));
        }
        return;
    }
}